<%-- 
    Document   : RDBCreateTest
    Created on : 22.04.2011, 21:53:55
    Author     : ain
--%>

<%@page import="unc.pds.data.RootDataBeanRemote"%>
<%@page import="unc.pds.data.Consts"%>
<%@page import="unc.pds.data.RootDataBeanRemoteHome"%>
<%@page import="unc.pds.util.ArchImpl"%>
<%@page import="unc.pds.util.Arch"%>
<%@page import="javax.naming.InitialContext"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <%
                    Arch doc = new ArchImpl("root", "");
                    Arch name = new ArchImpl(Consts.ATTR__USER_NICKNAME, "ain");
                    doc.addChild(name);
                    RootDataBeanRemoteHome rdbrh = (RootDataBeanRemoteHome) (new InitialContext()).lookup("ejb/RootDataBean");
                    RootDataBeanRemote dataBean = rdbrh.findByFieldSet(doc, Consts.OBJECT_TYPE__USER);
                    Long num = dataBean.getID();
                    rdbrh.remove(num);
        %>
    </body>
</html>
